<%--
  Created by IntelliJ IDEA.
  author: Jsonor
  date: 2018/5/2 17:01
  description: Description
--%>
<%@ taglib prefix ="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="description" content="首页" />
  <title>首页</title>
  <link type="text/css" rel="stylesheet" href="css/global.css" />
  <script src="js/jquery-1.7.min.js"></script>
  <!--[if lt IE 7]>
  <script type="text/javascript" src="js/unitpngfix.js"></script>
  <![endif]-->
  <script>
    $(document).ready(function()
    {
      $(".slvh").each(function(){
        var maxwidth=28;
        if($(this).text().length>maxwidth){
          $(this).text($(this).text().substring(0,maxwidth));
          $(this).html($(this).html()+' ...');
        } }); });

    $(document).ready(function()
    {
      $(".ywzsdes").each(function(){
        var maxwidth=140;
        if($(this).text().length>maxwidth){
          $(this).text($(this).text().substring(0,maxwidth));
          $(this).html($(this).html()+' ...');
        } }); });


  </script>
</head>
<body>
<div class="headbg">
  <div class="header">
    <ul class="logareg">
      <c:choose>
        <c:when test="${empty user}">
          <li><a href="${pageContext.request.contextPath }/user/login.jsp">登录</a></li>
          <li class="lineli">|</li>
          <li><a href="${pageContext.request.contextPath }/user/regist.jsp">注册</a></li>
        </c:when>
        <c:otherwise>
          <li>${user.name}</li>
          <li class="lineli">|</li>
          <li><a href="${pageContext.request.contextPath }/quit.do">退出</a></li>
        </c:otherwise>
      </c:choose>
    </ul>
    <div class="clear"></div>
    <img class="logo" src="images/logo.png" alt="" title="" />
    <ul class="topnav">
      <li class="topseled"><a href="${pageContext.request.contextPath}/showIndex.do">首页</a></li>
      <li><a href="${pageContext.request.contextPath}/showcar.do">我要买车</a></li>
      <li><a href="${pageContext.request.contextPath}/add.do">我的购物车</a></li>
      <li> <a href="${pageContext.request.contextPath}/orderAll.do">订单查询</a></li>

    </ul>

    <div class="clear"></div>
  </div>
</div>
</body>
</html>
